#ifndef __TEXTURE_H__
#define __TEXTURE_H__

#include <d3d9.h>
#include <d3dx9.h>


#include "Trace.h"


/**--------------------------------------------------------
*Program/Project : GameMario
*Written by :
*Email :
*Created date : 7/10/2012
*Modified by :
*Modified date :
*Version : 1.0
*Description : Lop khoi tao Texture
--------------------------------------------------------**/
class Texture
{
private:
	LPDIRECT3DDEVICE9 d3ddv;			//Direct3D device
	LPWSTR file_name;
	LPDIRECT3DTEXTURE9 texture;
	D3DCOLOR trans_color;

	int cols;
	int rows;
	int count;

	int width;
	int height;

public:

	Texture(LPDIRECT3DDEVICE9 d3ddv, LPWSTR file_name, int cols, int rows, int count, D3DCOLOR trans_color);
	~Texture();

	LPWSTR getFileName() { return file_name; }

	int getCols()  { return cols; }
	//void Cols(int val) { cols = val; }
	int getCount() const { return count; }
	//void Count(int val) { count = val; }
	int getWidth()  { return width; }
	//void Width(int val) { width = val; }
	int getHeight()  { return height; }
	//void Height(int val) { height = val; }

	LPDIRECT3DTEXTURE9 getTexture() { return texture; }
	void Load();
};
#endif